package com.jushu.storbox.manager;

import com.jushu.storbox.util.LogUtil;

public class BaseDownloadManager {
	
	public static final String TAG = BaseDownloadManager.class.getSimpleName();
	
	protected static long downloaddingSize = 0;
	
	public static void setDownloaddingSize(long taskSize) {
		LogUtil.d(TAG, "set downloaddingSize to: "+taskSize);
		downloaddingSize = taskSize;
	}
	
	public static double getDownloaddingSize() {
		LogUtil.d(TAG, "current downloaddingSize is: "+downloaddingSize);
		return downloaddingSize ;
	}
	
	/**
	 * @param taskSize
	 */
	public static void addDownloaddingSize(long taskSize) {
		LogUtil.d(TAG, "add a task of size: "+taskSize);
		downloaddingSize += taskSize;
	}

	/**
	 * @param taskSize
	 */
	public static void subDownloaddingSize(long taskSize) {
		LogUtil.d(TAG, "remove a task of size: "+taskSize);
		downloaddingSize -= taskSize;
	}
}
